#ifndef NETWORK_NETWORKJSONRESPONSE_H
#define NETWORK_NETWORKJSONRESPONSE_H

#include "networkresponse.h"

#include <QObject>

namespace Network {

class JSONResponse : public Network::Response
{
    Q_OBJECT
public:
    enum Error {
        NoneError = 0,
        MessageError = 1,
        CodecodeError = 2,
        DataNullError = 3
    };

    explicit JSONResponse(QObject *parent = 0);

signals:
    void notifyError(int error);

private:
    void parse(const QByteArray &data);

    virtual void parse(const QVariant &data) = 0 ;
};

} // namespace Network

#endif // NETWORK_NETWORKJSONRESPONSE_H
